@extends('content.layouts.default')
@section('content')
    <div class="card">
        <div class="card-body">
            <ul class="nav nav-tabs nav-overflow header-tabs">
                <li class="nav-item">
                    <a href="{{route('content.template.index')}}" class="nav-link pb-3 active">
                        模板列表
                    </a>
                </li>
                <li class="nav-item">
                    <a href="{{route('content.template.cache')}}" class="nav-link pb-3">
                        刷新模板
                    </a>
                </li>
            </ul>
        </div>

        <div class="card-body small">
            <div class="row listAlias">
                @foreach($themes as $theme)
                    <div class="col-12 col-md-6 col-xl-4">
                        <!-- Card -->
                        <div class="card">
                            <a href="{{route('content.template.update',$theme)}}">
                                <img src="{{$theme['preview']}}" style="height: 200px;" class="card-img-top">
                            </a>
                            <div class="card-body">
                                <div class="row align-items-center">
                                    <div class="col">
                                        <!-- Title -->
                                        <h4 class="card-title mb-2 name">
                                            <a href="{{route('content.template.update',$theme)}}">{{$theme['title']}}</a>
                                        </h4>

                                        <!-- Subtitle -->
                                        <p class="card-text small text-muted">
                                            作者：{{$theme['author']}}
                                        </p>
                                    </div>
                                </div>
                                <hr>
                                <div class="row align-items-center">
                                    <div class="col">
                                        <div class="row align-items-center no-gutters">
                                            <div class="col-auto">
                                                @if($theme['using'])
                                                    <a href="{{route('content.template.update',$theme)}}"
                                                       class="btn btn-primary btn-sm">
                                                        已使用
                                                    </a>
                                                @else
                                                    <a href="{{route('content.template.update',$theme)}}"
                                                       class="btn btn-light btn-sm">
                                                        未使用
                                                    </a>
                                                @endif
                                            </div>

                                        </div> <!-- / .row -->
                                    </div>

                                </div> <!-- / .row -->

                            </div> <!-- / .card-body -->
                        </div>

                    </div>
                @endforeach
            </div>
        </div>

    </div>





@endsection
